export interface Member {
  id: string;
  name: string;
  role: 'professor' | 'phd' | 'master' | 'undergraduate' | 'alumni';
  title?: string;
  email?: string;
  phone?: string;
  avatar?: string;
  bio?: string;
  researchAreas?: string[];
  homepage?: string;
  order?: number;
  isActive: boolean;
  joinDate?: string;
  graduationDate?: string;
  currentPosition?: string;
  createdAt: string;
  updatedAt: string;
}

export interface Project {
  id: string;
  title: string;
  description: string;
  fullDescription?: string;
  image?: string;
  images?: string[];
  status: 'ongoing' | 'completed' | 'paused';
  category: string;
  tags?: string[];
  startDate: string;
  endDate?: string;
  members?: string[]; // Member IDs
  achievements?: string[];
  links?: {
    name: string;
    url: string;
    type: 'github' | 'paper' | 'demo' | 'website';
  }[];
  order?: number;
  isPublished: boolean;
  createdAt: string;
  updatedAt: string;
}

export interface News {
  id: string;
  title: string;
  summary: string;
  content: string;
  image?: string;
  category: 'news' | 'achievement' | 'event' | 'announcement';
  tags?: string[];
  author: string;
  publishDate: string;
  isPublished: boolean;
  isPinned: boolean;
  viewCount: number;
  createdAt: string;
  updatedAt: string;
}

export interface Recruitment {
  id: string;
  title: string;
  description: string;
  requirements?: string[];
  responsibilities?: string[];
  positions: number;
  deadline?: string;
  contactEmail: string;
  contactPhone?: string;
  isActive: boolean;
  category: 'undergraduate' | 'graduate' | 'internship' | 'researcher';
  applicationForm?: {
    fields: FormField[];
  };
  createdAt: string;
  updatedAt: string;
}

export interface FormField {
  id: string;
  name: string;
  label: string;
  type: 'text' | 'email' | 'phone' | 'textarea' | 'select' | 'file' | 'checkbox';
  required: boolean;
  options?: string[];
  placeholder?: string;
  validation?: {
    min?: number;
    max?: number;
    pattern?: string;
    fileTypes?: string[];
    maxFileSize?: number;
  };
}

export interface Application {
  id: string;
  recruitmentId: string;
  applicantName: string;
  applicantEmail: string;
  applicantPhone?: string;
  formData: Record<string, any>;
  attachments?: {
    fieldName: string;
    filename: string;
    originalName: string;
    path: string;
    size: number;
  }[];
  status: 'pending' | 'reviewing' | 'accepted' | 'rejected';
  notes?: string;
  reviewedBy?: string;
  reviewedAt?: string;
  createdAt: string;
  updatedAt: string;
}

export interface SiteConfig {
  id: string;
  title: string;
  subtitle?: string;
  description: string;
  logo?: string;
  favicon?: string;
  contactInfo: {
    address?: string;
    phone?: string;
    email: string;
    website?: string;
    socialMedia?: {
      platform: string;
      url: string;
      icon?: string;
    }[];
  };
  theme: {
    primaryColor: string;
    secondaryColor: string;
    backgroundColor: string;
    textColor: string;
  };
  seo: {
    keywords: string[];
    ogImage?: string;
    twitterCard?: string;
  };
  navigation: {
    id: string;
    label: string;
    href: string;
    children?: {
      id: string;
      label: string;
      href: string;
    }[];
  }[];
  footer: {
    sections: {
      title: string;
      links: {
        label: string;
        href: string;
      }[];
    }[];
    copyright: string;
  };
  analytics?: {
    googleAnalytics?: string;
    baiduAnalytics?: string;
  };
  updatedAt: string;
}

export interface MediaFile {
  id: string;
  filename: string;
  originalName: string;
  path: string;
  url: string;
  mimeType: string;
  size: number;
  alt?: string;
  caption?: string;
  category?: string;
  uploadedBy: string;
  createdAt: string;
  updatedAt: string;
}

export interface User {
  id: string;
  username: string;
  email: string;
  role: 'admin' | 'editor' | 'viewer';
  name: string;
  avatar?: string;
  isActive: boolean;
  lastLoginAt?: string;
  createdAt: string;
  updatedAt: string;
}

export interface ApiResponse<T = any> {
  success: boolean;
  data?: T;
  message?: string;
  error?: string;
  pagination?: {
    page: number;
    limit: number;
    total: number;
    totalPages: number;
  };
}

export interface PaginationParams {
  page?: number;
  limit?: number;
  sort?: string;
  order?: 'asc' | 'desc';
  search?: string;
  category?: string;
  status?: string;
}